ExamPlay Dark Logo
Logga in

Computer Science for IGCSE & O level - Databases (Section 4 - No. 19)

What is the difference between `TRUNCATE` and `DELETE` statements?
TRUNCATE is faster and removes all rows, while DELETE is slower and removes specific rows.
TRUNCATE removes specific rows, while DELETE removes all rows.
TRUNCATE is used to add data, while DELETE is used to modify data.
There is no difference; they perform the same function.

Förklaring

TRUNCATE is generally faster and removes all rows in a table, resetting the auto-incrementing ID. DELETE removes specified rows based on a WHERE clause, or all rows if no WHERE clause is specified.

Kommentarer (0)

Logga in för att kommentera
Annons
BrainBehindX Inc Logo
©2026; Drivs av BrainBehindX Inc